package cn.shyouchi.wuguanjia.android.ui.home.security.thread.message.matter;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

import cn.shyouchi.wuguanjia.android.ui.home.security.thread.message.birthday.BirthdayWish;

/**
 * Created by Eenie on 2017/3/21 at 10:36
 * Email: 472279981@qq.com
 * Des:
 */

public class MatterBirthday implements Parcelable {


    /**
     * id : 3
     * user_id : 1
     * name : 唐海斌
     * avatar : /images/user/20170320/20170320154553YC996510108.jpg
     * info : []
     * blessing : 0
     */

    private int id;
    private int user_id;
    private String name;
    private String avatar;
    private int blessing;
    private List<BirthdayWish> info;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUser_id() {
        return user_id;
    }

    public void setUser_id(int user_id) {
        this.user_id = user_id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public int getBlessing() {
        return blessing;
    }

    public void setBlessing(int blessing) {
        this.blessing = blessing;
    }

    public List<BirthdayWish> getInfo() {
        return info;
    }

    public void setInfo(List<BirthdayWish> info) {
        this.info = info;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeInt(this.user_id);
        dest.writeString(this.name);
        dest.writeString(this.avatar);
        dest.writeInt(this.blessing);
        dest.writeList(this.info);
    }

    public MatterBirthday() {
    }

    protected MatterBirthday(Parcel in) {
        this.id = in.readInt();
        this.user_id = in.readInt();
        this.name = in.readString();
        this.avatar = in.readString();
        this.blessing = in.readInt();
        this.info = new ArrayList<BirthdayWish>();
        in.readList(this.info, BirthdayWish.class.getClassLoader());
    }

    public static final Parcelable.Creator<MatterBirthday> CREATOR = new Parcelable.Creator<MatterBirthday>() {
        @Override
        public MatterBirthday createFromParcel(Parcel source) {
            return new MatterBirthday(source);
        }

        @Override
        public MatterBirthday[] newArray(int size) {
            return new MatterBirthday[size];
        }
    };
}
